class Friend < ActiveRecord::Base
  belongs_to :user
  
  validates_presence_of :user_id
  validates_presence_of :friend_user_id
  
  def validate 
    if !User.find_by_id(self.user_id) || !User.find_by_id(self.friend_user_id)
      errors.add_to_base("Users do not exist")
    end
  end
end
